package classes_and_objects_0826;

public class Main {
    public static void main(String[] args) {
        //创建对象，对象调用成员变量赋值
        Dogs dog1 = new Dogs();
        dog1.name = "小呆";
        dog1.color = "黄色";
        dog1.bark();
        dog1.wag();

        Dogs dog2 = new Dogs();
        dog2.name = "小啥";
        dog2.color = "黑色";
        dog2.bark();
        dog2.wag();
        //有参构造方法给属性赋值
        Students st1 = new Students("小孩", "男", 18, 99.4);
        //无参
        Students st2=new Students();
    }
}
